/*
 * RemotePlayerInputHandler.java
 *
 * Created on January 25, 2007, 5:25 AM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package net.sf.iSnake.core;

/**
 *
 * @author thelinuxmaniac
 */
public class RemotePlayerInputHandler extends SnakeInputHandler {
    private short dx;
    private short dy;
    
    private boolean debug;
    private boolean startTrappingDirectionKeys;
    
    /** Creates a new instance of RemotePlayerInputHandler */
    public RemotePlayerInputHandler(Short player_id) {
        super("Remote Player - "+player_id.toString());
        this.dx = 0;
        this.dy = 0;
        this.setDebug(false);
        this.setStartTrappingDirectionKeys(false);
        
    }
    public void setDx(short dx)
    {
        // only make changes to dx if startTrappingDirectionKeys = true
        if(this.isStartTrappingDirectionKeys())
            this.dx = dx;
    }
    
    public void setDy(short dy)
    {
        // only make changes to dy if startTrappingDirectionKeys = true
        if(this.isStartTrappingDirectionKeys())
            this.dy = dy;
    }
    
    public short getDX() {
        return dx;
    }

    public short getDY() {
        return dy;
    }

    public boolean isDebug() {
        return debug;
    }

    public void setDebug(boolean debug) {
        this.debug = debug;
    }

    public boolean isStartTrappingDirectionKeys() {
        return startTrappingDirectionKeys;
    }

    public void setStartTrappingDirectionKeys(boolean startTrappingDirectionKeys) {
        this.startTrappingDirectionKeys = startTrappingDirectionKeys;
    }
    
}
